<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>table</title>
    <style>

         .table{
              width: 100%;
              border-collapse: collapse;

         }
         .table,table th,table td{
             border: 1px solid;
         }

         .table tbody tr:nth-child(odd){
              background-color: greenyellow;
         }
    </style>
</head>
<body>


<table class="table">
    <thead>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>部门</th>
        <th>职务</th>
    </tr>
    </thead>
    <tbody>
         <tr>
             <td>001</td>
             <td>M</td>
             <td>Dev</td>
             <td>普通员工</td>
         </tr>
         <tr>
             <td>002</td>
             <td>M</td>
             <td>Dev</td>
             <td>普通员工</td>
         </tr>
         <tr>
             <td>003</td>
             <td>M</td>
             <td>Dev</td>
             <td>普通员工</td>
         </tr>
         <tr>
             <td>004</td>
             <td>M</td>
             <td>Dev</td>
             <td>普通员工</td>
         </tr>
         <tr>
             <td>005</td>
             <td>M</td>
             <td>Dev</td>
             <td>普通员工</td>
         </tr>
    </tbody>
</table>
</body>
</html>